execs().with_status(2));
});
+test!(exit_code_verbose {
+ let p = project("foo")
+ .file("Cargo.toml", r#"
+ [project]
+ name = "foo"
+ version = "0.0.1"
+ authors = []
+ "#)
+ .file("src/main.rs", r#"
+ fn main() { std::process::exit(2); }
+ "#);
+
+ assert_that(p.cargo_process("run").arg("-v"),
+ execs().with_status(2)
+ .with_stderr(&format!("\
+Process didn't exit successfully: `target[..]foo` (exit code: 2)
+",
+ )));
+});
+
test!(no_main_file {
let p = project("foo")
.file("Cargo.toml", r#"